diff options
| author | Adam Soltys <[email protected]> | 2022-08-23 02:26:09 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-08-23 02:26:14 -0700 |
| commit | c7ee4f41c5fe8b5664c82e65bc4aa7948dc7b510 (patch) | |
| tree | 3dea8c1d12518c6b5e8a3ebffa75313078232a7c /src/routes/invoice/[id]/+page.server.js | |
| parent | 63628385f1128503334711c8813f483a87a78ebe (diff) | |
| download | coinos-ui-c7ee4f41c5fe8b5664c82e65bc4aa7948dc7b510.tar.gz coinos-ui-c7ee4f41c5fe8b5664c82e65bc4aa7948dc7b510.zip | |
generate new invoice on tip
Diffstat (limited to 'src/routes/invoice/[id]/+page.server.js')
| -rw-r--r-- | src/routes/invoice/[id]/+page.server.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/routes/invoice/[id]/+page.server.js b/src/routes/invoice/[id]/+page.server.js index 78607545..d46d039b 100644 --- a/src/routes/invoice/[id]/+page.server.js +++ b/src/routes/invoice/[id]/+page.server.js @@ -1,14 +1,8 @@ -import { get } from '$lib/utils'; +import cookie from 'cookie'; +import { get, post } from '$lib/utils'; export async function load({ params }) { let { id } = params; - let { - amount, - rate, - status, - text, - user: { username } - } = await get(`/invoice?uuid=${id}`); - - return { amount, id, rate, username, status, text }; + return { id, invoice: await get(`/invoice?uuid=${id}`) }; } + |
